package org.bao.bestmatch.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * get current date and time.
 * @author baoxiwu<bb@feijiao.info>,Cell&Module,BOE DT
 * @version 0.9.0
 * @since 2010-11-22
 * @license LGPL
 * 
 */
public class Cal {
	public static String getDateTime(){
		Calendar cal = Calendar.getInstance();
		
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd_HHmmss");
		return sdf.format(cal.getTimeInMillis());
	}
	
	public static String getDate(){
		Calendar cal = Calendar.getInstance();
		
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		return sdf.format(cal.getTimeInMillis());
	}
}
